unit SomeThread;

interface

uses
  Classes;

type
  TSomething = class(TThread)
  private
    { Private declarations }
  protected
    procedure Execute; override;
  end;

implementation

{ Important: Methods and properties of objects in VCL can only be used in a
  method called using Synchronize, for example,

      Synchronize(UpdateCaption);

  and UpdateCaption could look like,

    procedure TSomething.UpdateCaption;
    begin
      Form1.Caption := 'Updated in a thread';
    end; }


{ TSomething }

procedure TSomething.Execute;
begin
  { Place thread code here }
   FreeOnTerminate:=True; 
end;
